﻿@using QqhrCitizen.Models
@using QqhrCitizen.Models.ViewModel
@{
    EBook ebook = ViewBag.Ebook as EBook;
    List<vReadRecord> recoreds = ViewBag.LstRecord as List<vReadRecord>;
    ViewBag.Search = "新闻、标签";
    ViewBag.Title = "电子书简介_齐齐哈尔市民学习网";
}
<script>
    $("#topmenu_ebook").attr("class", "item_selected");
</script>
<div id="d_menu" class="d-menu menu-bok">
    <div id="d_menu_c" class="d-menu-c">
        <!-- region start: menu -->
        <div id="d_headmenu" class="d-headmenu">
            <div class="body">
                <a class="item" href="/EBook/Index" id="headmenu_default">电子书首页</a>
                <a class="item" href="/EBook/Discovery/0" id="headmenu_discovery">发现电子书</a>
                <!--<a id="headmenu_bookshelf" class="item" href="/book/bookshelf">我的藏书</a>-->
            </div>
        </div><!-- region end: menu -->
    </div>
</div>
<div id="d_bottom" class="d-bottom" style="visibility: hidden; position: relative;"><div class="d-bottom-c"><div id="d_scrolltop" class="d-scrolltop" style="right: -70px;"><span class="t" onclick="$('html,body').animate({scrollTop: '0px'}, 800);">顶部</span></div></div></div>
<div class="d-row" style="padding: 0 0 40px 0;">
    <div class="d-row-c">
        <div class="d-col-2-8">
            <div class="contentarea">
                <!-- region start: 电子书详细 -->
                <div id="d_bookdetail" class="d-bookdetail">
                    <input type="hidden" id="hdCurrentuser" value="@(ViewBag.CurrentUser!=null? @ViewBag.CurrentUser.Username:"")" />
                    <div class="title">@ebook.Title</div>
                    <div class="cover">
                        <img src="/Ebook/ShowPicture/@ebook.ID" style="width: 102px; height: 144px;" />
                    </div>
                    <div class="info">
                        <div class="author">作者：@ebook.Author</div>
                        <div class="classification">分类：@ebook.TypeDictionary.TypeValue</div>
                        <div class="readbtn">
                            @if (@ebook.FileID.ToString() != "")
                            {
                                <a href="/EBook/Read/@ebook.ID" class="btn btn-small btn-orange" target="_blank">在线阅读</a>
                            }
                            else
                            {
                                <span class="btn btn-small btn-orange">暂时无法在线阅读</span>
                            }
                            <br>
                        </div>
                    </div>
                    <div class="social">
                        <div id="divAmount" class="amount">
                            <a href="#comment">
                                (<span>@ebook.Browses</span>人浏览)
                            </a>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <div class="action">
                        <div class="l" id="divReadbBook">
                            <button type="button" id="btnIR" style="display: none;" class="btn btn-small">在读</button>
                            <button type="button" id="btnHR" style="display: none;" class="btn btn-small">读过</button>
                        </div>

                        <div class="r">
                            <span style="display: none;" id="spanAddToList">
                                <a href="#">添加到藏书单</a>
                            </span>

                            <!--分享-->
                            <span class="dropdown">

                            </span>
                        </div>
                        <div class="clear"></div>
                    </div>
                    <div class="brief" style="display: block;">
                        <div class="head">内容简介</div>
                        <pre class="area txt-justify">@ebook.Description</pre>
                    </div>
                    <div class="authorbrief" style="display: none;">
                        <div class="head">作者简介</div>
                        <pre class="area txt-justify"></pre>
                    </div>
                    <div class="desc" style="display: none;">
                        <div class="head">试读</div>
                        <pre class="area txt-justify"></pre>
                    </div>
                </div>
                <!-- region end: 电子书详细 -->
                <!-- region start: 电子书评论 -->
                <div id="d_bookcomment" class="d-bookcomment">
                    <div class="head">
                        书评
                    </div>
                    <div class="body">
                        <!-- 电子书评论框 start -->
                        <div class="ds-thread" data-thread-key="@ebook.EBookTypeID+@ebook.ID" data-title="@ebook.Title" data-url="@HttpContext.Current.Request.Url.ToString()"></div>
                        <!-- 电子书评论框 end -->
                        <!-- 电子书公共JS代码 start (一个网页只需插入一次) -->
                        <script type="text/javascript">
                            var duoshuoQuery = { short_name: "qqhrcitizen" };
                            (function () {
                                var ds = document.createElement('script');
                                ds.type = 'text/javascript'; ds.async = true;
                                ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
                                ds.charset = 'UTF-8';
                                (document.getElementsByTagName('head')[0]
                                    || document.getElementsByTagName('body')[0]).appendChild(ds);
                            })();
                        </script>
                        <!-- 电子书公共JS代码 end -->
                    </div>
                </div>
                <!-- region end: 电子书评论 -->
                <!-- region start: 喜欢本书的人也喜欢 -->
                <div id="d_booklike" class="d-booklike">
                    <div class="head">您可能喜欢的电子书</div>
                    <div class="body" id="divLike">
                        @foreach (var item in ViewBag.LstInterestBook as List<EBook>)
                        {
                            <div class="item">
                                <a class="cover" href="/EBook/Show/@item.ID" target="_parent" title="@item.Title" style="width:68px;height:96px;">
                                    <img style="width:106px;height:158px;" src="/Ebook/ShowPicture/@item.ID" data-echo=" " onerror="javascript:this.onerror=null;this.src='/Ebook/ShowPicture/@item.ID'">
                                </a>
                                <div class="title trim">
                                    <a title="@item.Title" href="/EBook/Show/@item.ID" target="_parent">@item.Title</a>
                                </div>
                            </div>
                        }
                    </div>
                </div>
                <!-- region end: 喜欢本书的人也喜欢 -->
                
            </div>
        </div>
        <div class="d-col-2-4">
            <div class="contentarea">
                <!-- region start: 相关标签 -->
                <div id="d_booktagrelated" class="d-booktagrelated">
                    <div class="head">相关分类</div>
                    <div class="body">
                        @foreach (var item in ViewBag.LstType as List<TypeDictionary>)
                        {
                        <span class="item">
                            <a href="/EBook/Discovery/@item.ID">@item.TypeValue</a>
                            <span></span>
                        </span>
                        }
                    </div>
                </div>
                <!-- region end: 相关推荐 -->
                <!-- region start: 也读过这本书 -->
                <div id="d_bookread" class="d-bookread">
                    <div class="head">读者动态</div>
                    <div class="body">
                        <div id="divRecordList" class="body">
                            @if (recoreds.Count != 0)
                            {
                                foreach (var item in recoreds)
                                {
                            <div class="item">
                                <div class="name trim">
                                    <a href="#" title="@item.User.Username">@item.User.Username</a>
                                </div>
                                <div class="status trim">@item.Time 阅读了本书</div>

                                <a class="cover" href="#">
                                    @if (item.User.Picture != null)
                                            {
                                            <img src="/User/ShowPicture/@item.UserID" style="width:48px;height:48px;">
                                            }
                                            else
                                            {
                                            <img src="~/Images/userphoto.png" style="width:48px;height:48px;">
                                            }
                                </a>
                            </div>
                                }
                            }

                        </div>
                    </div>

                </div>
            </div>
        </div>

        <div class="clear"></div>
    </div>
</div>

